"
I am a tab which can be locked/unlocked with according action and icon
"
Class {
	#name : 'LockableTabMorph',
	#superclass : 'TabMorph',
	#category : 'Morphic-Deprecated',
	#package : 'Morphic-Deprecated'
}

{ #category : 'icons' }
LockableTabMorph class >> lockedIcon [

	^ Icons
		at: #lockedIcon
		ifAbsentPut: [ self lockedIconContents ]
]

{ #category : 'icons - contents' }
LockableTabMorph class >> lockedIconContents [

	^ Form
		extent: 12@12
		depth: 32
		fromArray: #(0 0 0 807082779 3175894092 4235885178 4235885178 3159116876 807082779 0 0 0 0 0 1107296256 4286545791 4290164406 3801519766 3801519766 4290230199 4286545791 1107296256 0 0 0 0 3578020932 4290295992 2284991026 335741699 335741699 2285122612 4290361785 3578020932 0 0 0 301989888 3899288170 4019755160 738197504 0 0 738197504 4019228816 3900011893 301989888 0 33554432 1478500384 4100746348 4137458844 2436709693 2035898713 2035898713 2436907072 4135814019 4102325380 1478171419 33554432 234881024 3429723501 4291611852 4292532954 4292072403 4292072403 4292072403 4292072403 4292401368 4291809231 3429723501 234881024 251658240 3480120942 4291546059 4292138196 4292269782 4292006610 4292006610 4292269782 4292138196 4291546059 3480120942 251658240 251658240 3479857770 4290559164 4291217094 4291743438 4285493103 4285493103 4291743438 4291282887 4290559164 3479857770 251658240 251658240 3479726184 4290098613 4290756543 4291151301 4286743170 4286743170 4291151301 4290756543 4290230199 3479726184 251658240 251658240 3479660391 4289967027 4290624957 4290822336 4289703855 4289703855 4290822336 4290624957 4290032820 3479726184 251658240 268435456 3530057832 4290230199 4290888129 4290888129 4291019715 4291019715 4290888129 4290888129 4290230199 3530123625 268435456 150994944 2939631415 4283979864 4284308829 4284374622 4284374622 4284374622 4284374622 4284308829 4284045657 2939697208 150994944)
		offset: 0@0
]

{ #category : 'accessing' }
LockableTabMorph >> closeable: anObject [

	closeable := anObject.
	anObject
		ifTrue: [ self setUnlockedIcon ]
		ifFalse: [ self setLockedIcon ]
]

{ #category : 'private' }
LockableTabMorph >> setLockedIcon [

	closeIcon image: self class lockedIcon
]

{ #category : 'private' }
LockableTabMorph >> setUnlockedIcon [

	closeIcon image: self class closeIcon
]

{ #category : 'protocol' }
LockableTabMorph >> showCloseIcon [

	closeIcon show
]
